///////////////////////////////////////////////////////////
// 
//  Note.h
//
//  Wiicussion
//  HCI 575 Class project
//  Spring 2007
// 
//  Authors:  Jeremy Bennett
//            Adam Faeth
//            Michael Oren
//
///////////////////////////////////////////////////////////

#ifndef _NOTE_H_
#define _NOTE_H_

// Local Includes
#include "MyImage.h"

// SDL Includes
#include <sdl.h>

// System Includes

// Forward Declarations
class MyContext;

class Note
{
public:
    // x,y coords, widht, height, instrument
    Note( float fStX, float fStY, float fEndX, float fEndY, float w, float h, unsigned int iInst, unsigned int uiTime );
    ~Note();
    
    bool setRendPosition( const float *pPos );
    bool postFrame(unsigned int uiTime);
    
    bool setMatched(bool bMatch);
    bool setTime(unsigned int uiTime, unsigned int uiTravelTime);
    unsigned int getTime(void) { return _uiTime; }
    unsigned int  getInst(void) { return _uiInst; }
    
    bool renderNote( MyContext *pContext=NULL );
    
protected:
    int        _uID;
    
    // Note information
    unsigned int      _uiTime;
    unsigned int      _uiInst;
    bool              _bMatched;
    
    // Note UI Rendering
    float             _fRenderSize[2];
    float             _fRenderPos[2];
    
    // Note Description
    float             _fColor[4];
    
    // Note Location
    float             _fStX;
    float             _fStY;
    float             _fDistX;
    float             _fDistY;
    unsigned int      _uiTravelTicks;
    
    static bool s_bVerbose;
};

#endif // _NOTE_H_

